import request from '@/utils/request'

// 查询信息发布列表
export function listMessage(query) {
  return request({
    url: '/carService/message/list',
    method: 'get',
    params: query
  })
}
export function listMessage1(query) {
  return request({
    url: '/carService/message/list1',
    method: 'get',
    params: query
  })
}

// 查询已审核信息发布列表
export function newListMessage(query) {
  return request({
    url: '/carService/message/find',
    method: 'get',
    params: query
  })
}


// 查询信息发布详细
export function getMessage(mesId) {
  return request({
    url: '/carService/message/' + mesId,
    method: 'get'
  })
}

// 新增信息发布
export function addMessage(data) {
  return request({
    url: '/carService/message',
    method: 'post',
    data: data
  })
}

// 修改信息发布
export function updateMessage(data) {
  return request({
    url: '/carService/message',
    method: 'put',
    data: data
  })
}

// 删除信息发布
export function delMessage(mesId) {
  return request({
    url: '/carService/message/' + mesId,
    method: 'delete'
  })
}
//修改上下架
export function updateState(data) {
  return request({
    url: '/carService/message/s',
    method: 'post',
    data: data
  })
}

